<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
	<head>
		<script language="JavaScript">
			function changeImg() {
				document.getElementById('jcaptchaImg').src='/jcaptcha.jpg?now=' + new Date().getTime();
			}
		</script>
	</head>
	<body>
		<h1>Logon</h1>

		<s:actionerror/>
		<s:fielderror/>
		
		<s:form action="doLogin">
			<table>
				<tr>
					<td>Username</td>
					<td><s:textfield key="username" /></td>
				</tr>
				<tr>
					<td>Password</td>
					<td><s:textfield key="password" /></td>
				</tr>
				<tr>
					<td colspan="2">
						<img id="jcaptchaImg" src="/jcaptcha.jpg"><input type="text" name="jcaptcha" value="" />
						<a href="#" onclick="changeImg()">Change Another</a>
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<input type="submit" value="Submit"/>
						<input type="reset" value="Reset"/>
					</td>
				</tr>
			</table>
		</s:form>
	</body>
</html>
